<template>
  <el-row>
    <el-col :span="12">
      <el-statistic title="商品总数量" :value="usernumber" />
    </el-col>
    <el-col :span="12">
      <el-statistic title="用户总数量" :value="shopnumber">
        <template #suffix>
        </template>
      </el-statistic>
    </el-col>
  </el-row>
</template>

<script  setup>
import { ChatLineRound, Male } from '@element-plus/icons-vue'
import { computed, ref, reactive, onMounted } from 'vue'
import { getshopnumber ,getusernumber} from '../../api/statisticsshow'
const usernumber = ref(0)
const shopnumber = ref(0)

onMounted(async () => {
  let res = await getshopnumber('/statistic/product')
  console.log(res)
  if (res.code == '200') {
    usernumber.value = res.data
    console.log(usernumber.value);
    
  }
})
onMounted(async () => {
  let res = await getusernumber('statistic/user')
  console.log(res)
  if (res.code == '200') {
    shopnumber.value = res.data
    console.log(shopnumber.value);
    
  }
})
</script>

<style scoped>
.el-col {
  text-align: center;
}
</style>